package test06.tx1;

public class BoyThread extends Thread {
    private Box box;
    private String name;
    public BoyThread(Box box, String name) {
        this.box = box;
        this.name = name;
    }
    @Override
    public void run() {
        while (true) {
            Fruit fruit = new Fruit();
            box.put(name,fruit);
        }
    }
}
